package la.bbs558.strategy.base;

import java.io.Serializable;
import java.util.Optional;

/**
 * 策略类的上下文
 */
public interface StrategyContext extends Serializable {
    Optional<StrategyEnum> getStrategyEnum();
    default void handle(){
        StrategyFactory.get(this).ifPresent(strategy-> strategy.handle(this));
    }

}
